#pragma once
#include "CGeometry.h"

class CGeometryBuilder;
class CPathFigureCollection;

class CPathGeometry :
	public CGeometry
{
private: 
	CPathGeometry(CCoreServices * pCore);
	virtual ~CPathGeometry();
public: 
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual XUINT32 GetTypeIndex() const;
	virtual HRESULT AddToPath(const CMILMatrix * pMatrix);
	virtual HRESULT RegeneratePathData();
	HRESULT ToString(CXString * *);
	HRESULT DrawLines(const struct XPOINTF * pPoints, XUINT32 uiPointCount, XBOOL fIsClosed);
protected: 
	virtual HRESULT GetPrintGeometryVirtual(const struct D2DPrecomputeParams & cp, const struct D2DRenderParams & printParams, struct IPALAcceleratedGeometry * * ppGeometry);
private: 
	HRESULT ParseGeometry(CGeometryBuilder * pBuilder, XUINT32 cData, XUINT16 * pRasterizerPath, XINT32 bAllowFill);
public: 
	CPathFigureCollection * m_pFigures;
protected: 
	virtual HRESULT UpdateAcceleratedGeometryVirtual(const struct D2DPrecomputeParams & cp);
	virtual HRESULT VisitSinkInternal(struct IPALGeometrySink * pSink);
};